#include <iostream>

using namespace std;

class Line 
{
    public:
        double length;
        void setLength( double len );
        double getLength( void );
};

void Line::setLength( double len )
{
    length = len;
}

double Line::getLength(void)
{
    return length;
} 

int main() {
    Line ll;

    ll.setLength(6.6);
    cout << "Length of line : " << ll.getLength() << endl;

    ll.length = 9.9;
    cout << " 不使用成员函数设置长度 " << ll.length << endl;
    return 0;
}